#include <stdio.h>
#include <time.h>

typedef signed char        int8_t;
typedef short              int16_t;
typedef int                int32_t;
typedef long long          int64_t;
typedef unsigned char      uint8_t;
typedef unsigned short     uint16_t;
typedef unsigned int       uint32_t;
typedef unsigned long long uint64_t;

uint8_t time_bcd() {
	time_t rawtime;
	time(&rawtime);
	uint8_t bcd[7];
	struct tm* timeinfo;
	timeinfo = localtime(&rawtime);
	printf("%04X%02X%02X%02X%02X%02X\n",
	       1900 + timeinfo->tm_year,
	       1 + timeinfo->tm_mon,
	       timeinfo->tm_mday,
	       timeinfo->tm_hour,
	       timeinfo->tm_min,
	       timeinfo->tm_sec
	      );
	sprintf(bcd, "%04X%02X%02X%02X%02X%02X\n",
	        1900 + timeinfo->tm_year,
	        1 + timeinfo->tm_mon,
	        timeinfo->tm_mday,
	        timeinfo->tm_hour,
	        timeinfo->tm_min,
	        timeinfo->tm_sec);
	return bcd;
}

int main() {
	time_bcd();
	return 0;
}
